package com.zb.model;

public class TGoodsInShopCart {

	private String userId;
	
	private String goodsImg;
	
	private String goodsName;
	
	private double price;
	
	private String goodsId;
	
	public String getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}

	private int count;
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	 @Override
	    public boolean equals(Object o) {
	        if (this == o) return true;
	        if (o == null || this.getClass() != o.getClass()) return false;
	        
	        TGoodsInShopCart good = (TGoodsInShopCart) o;
	        
	        if (!(goodsId.equals(good.goodsId)&&userId.equals(good.userId))) return false;
	        return true;
	    }
	 
	 @Override
	 public int hashCode() {
	    int result = goodsId.hashCode();
	    result = 31 * result + userId.hashCode();
	    return result;
	 }
	
	@Override
	public String toString() {
		return "TShopCart [userId=" + userId + ", goodsImg=" + goodsImg + ", goodsName=" + goodsName + ", price="
				+ price + ", count=" + count + "]";
	}
}
